public class SumDemo {
    public static int getSum(int num) {
//        字符串有长度
        Integer n = (Integer) 12345;
        String i = n.toString();
        int length = i.length();
        System.out.println(i.length());
//        String i="123";
//        i.length();
        int s = (int) Math.pow(10, 2);
        int[] arr1 = new int[length];
        for (int j = 1; j <= i.length(); j++) {
            int a = n / (int) Math.pow(10, length - 1);
            arr1[j - 1] = a;
            n = n % (int) Math.pow(10, length - 1);

        }
return i.length();
    }

    public static void main(String[] args) {

    }
}
